//
// Created by cljh on 2023/3/28.
//

#ifndef BIN_PACKING_NFPKEY_H
#define BIN_PACKING_NFPKEY_H


#include <string>

class NfpKey{//nfp键
public:
    int pida,pidb;
    bool inside;
    int aRotation,bRotation;
    NfpKey(int _pida, int _pidb, bool _inside, int _aRotation, int _bRotation) {
        pida = _pida;
        pidb = _pidb;
        inside = _inside;
        aRotation = _aRotation;
        bRotation = _bRotation;
    }
    NfpKey(const NfpKey& key) {
        pida = key.pida;
        pidb = key.pidb;
        inside = key.inside;
        aRotation = key.aRotation;
        bRotation = key.bRotation;
    }
    NfpKey() {
        pida = -1;
        pidb = -1;
        inside = false;
        aRotation = 0;
        bRotation = 0;
    }
    bool isInside(){
        return inside;
    }
    std::string toString(){
        return "A"+std::to_string(pida)+"B"+std::to_string(pidb)+"I"+std::to_string((int)inside)+"AR"+std::to_string(aRotation)+"BR"+std::to_string(bRotation);
    }
};




#endif //BIN_PACKING_NFPKEY_H
